package designparttendemo2.observer;

import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class UserEventObserver2 implements ApplicationListener<UserEvent> {
    @Override
    public void onApplicationEvent(UserEvent event) {
        System.out.println(String.format("观察者2观察到事件:%s", event.getMessage()));
    }
}
